package com.yh.create.factoryMethod;

import java.util.TreeSet;

/**
 * Created by Rocky on 2018/7/25.
 */
public class NvWa {
    public static void main(String[] args) {
        Human human = HumanFactory.createHuman(YellowHuman.class);
        human.cry();
        human.talk();
        human.laugh();
        TreeSet<String> strings = new TreeSet<String>();
        Human human2 = HumanFactory.createHuman(BlackHuman.class);
        human2.cry();
        human2.talk();
        human2.laugh();

        Human human3 = HumanFactory.createHuman(WhiteHuman.class);
        human3.cry();
        human3.talk();
        human3.laugh();
    }
}
